﻿using System.Collections.Generic;
using System.Xml.Serialization;

namespace BaseUtils.AppConfig
{
    public class Runtime : RootBase
    {
        [XmlElement("offset")]
        public List<OffsetItem> Offsets { get; set; }

        [XmlElement("location")]
        public Location Location { get; set; }

        [XmlElement("recipe")]
        public List<Recipe> Recipes { get; set; }

        public Runtime()
        {
            Recipes = new List<Recipe>();
        }
    }

    public class Recipe : RootBase
    {

        [XmlAttribute("confirmAddress")]
        public string ConfirmAddress { get; set; }

        [XmlAttribute("programAddress")]
        public string ProgramAddress { get; set; }

        [XmlAttribute("ip")]
        public string Ip { get; set; }

        [XmlElement("offset")]
        public List<Offset> Offsets { get; set; }

    }

    public class Location : RootBase
    {

        [XmlAttribute("cupType")]
        public string CupType { get; set; }

        [XmlElement("item")]
        public List<Offset> Programs { get; set; }
    }

}
